package org.jeecg.modules.message.enums;

import org.jeecg.common.annotation.EnumDict;
import org.jeecg.common.enums.IEnumDict;
import org.jeecg.common.exception.JeecgBootException;

@EnumDict(code ="message_biz_type_enums", name = "消息业务类型枚举")
public enum MessageBizTypeEnums implements IEnumDict<MessageBizTypeEnums> {

    REGISTER_CODE("register_code", "注册验证码", "register_code");

    private String value;
    private String label;
    private String key;

    MessageBizTypeEnums(String value, String label, String key) {
        this.value = value;
        this.label = label;
        this.key = key;
    }

    @Override
    public String getValue() {
        return value;
    }

    @Override
    public String getLabel() {
        return label;
    }

    @Override
    public String getKey() {
        return key;
    }

    @Override
    public String getRemark() {
        return null;
    }

    public static MessageBizTypeEnums getEnumByValue(String value){
        for(MessageBizTypeEnums item: values()){
            if(value.equals(item.value)){
                return item;
            }
        }
        throw new JeecgBootException("没找到对应字典");
    }

}
